package com.huanletao.tran.demo;

import com.zaxxer.hikari.HikariDataSource;

import java.sql.Connection;

public class Demo01 {

    public static void main(String[] args) {

        try (HikariDataSource hikari = new HikariDataSource()) {
            hikari.setUsername("root");
            hikari.setJdbcUrl("jdbc:mysql:///push_platform?useSSL=false");
            hikari.setDriverClassName("com.mysql.jdbc.Driver");
            hikari.setPassword("root");
            hikari.setIdleTimeout(10000);
            hikari.setConnectionTimeout(1000);
            hikari.setInitializationFailTimeout(2000);
           Connection connection = hikari.getConnection();
            for (;;){

            }
        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }
}
